![]() |
PBHDeleteSync |
||||
Header: | Files.h | Carbon status: | Supported | |
Deletes a file or directory.
OSErr PBHDeleteSync ( HParmBlkPtr paramBlock );
A pointer to a basic HFS parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion function.
On output, the result code of the function.
On input, a pointer to a pathname.
On input, a volume specification.
On input, a directory ID.
If the specified target is a file, both forks of the file are deleted. In addition, if a file ID reference for the specified file exists, that file ID reference is also removed.
A file must be closed before you can delete it. Similarly, you cannot delete a directory unless it’s empty. If you attempt to delete an open file or a nonempty directory, PBHDeleteSync returns the result code fBsyErr. PBHDeleteSync also returns fBsyErr if you attempt to delete a directory that has an open working directory associated with it.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)